#pragma once

#include <vector>
using namespace std;

#include "../Core/CParticleEmitter.h"

enum EParticles { PARTICLE_BLOOD, PARTICLE_CASTLE, PARTICLE_RAIN, PARTICLE_SNOW, MAXPARTICLES };

class ParticleManager
{
	CParticleEmitter particles[MAXPARTICLES];

	vector<CParticleEmitter*> activeParticles;

	ParticleManager() {};
	~ParticleManager() {};
	ParticleManager(const ParticleManager&);
	ParticleManager& operator=(const ParticleManager&);

public:

	void Init();
	void Shutdown();

	void RemoveEmitter( CParticleEmitter* emitterToDelete );

	vector<CParticleEmitter*>& GetActiveParticles() { return activeParticles; }

	CParticleEmitter* CreateEmitter(int type);

	void Render();

	void Update(float dt);

	static ParticleManager* GetInstance();
};